<?php


class Admin_Language_Controller extends Admin_Controller {

	public $restful = true;

	public function __construct()
	{
		parent::__construct();
		//--Your Code --//
		$this->theme->set_theme("admin") ;
		$this->theme->set_layout("default");


	}


	public function get_index(){

		$data['mode'] = "INDEX";

		$this->theme->title("Edit Language");
		return $this->theme->render('admin::language',$data);
	}

	public function post_index(){

		$filename = 'indexpage.php';

		$dirPath = path('app').'language/en/';
			
			
			
		$fn = $dirPath . $filename;



		$register = Input::get('register');

		$add_business = Input::get('add_business');

		$login = Input::get('login');

		$administrator = Input::get('administrator');

		$dashboard = Input::get('dashboard');

		$change_password = Input::get('change_password');

		$add_your_business = Input::get('add_your_business');

		$profile= Input::get('profile');

		$logout= Input::get('logout');

		$contact= Input::get('contact');

		$close= Input::get('close');

		$member_login= Input::get('member_login');

		$email_address= Input::get('email_address');

		$password= Input::get('password');

		$submit= Input::get('submit');

		$forgot_your_password= Input::get('forgot_your_password');

		$services= Input::get('services');

		$business= Input::get('business');

		$product= Input::get('product');

		$buy_lead= Input::get('buy_lead');

		$what= Input::get('what');

		$e_g_web_development= Input::get('e_g_web_development');

		$choose_an_option= Input::get('choose_an_option');

		$where= Input::get('where');

		$clear= Input::get('clear');

		$find= Input::get('find');

		$business = Input::get('business?');

		$e_g_i_e_matrixinfoline= Input::get('e_g_i_e_matrixinfoline');

		$products = Input::get('products?');

		$total_business_listing= Input::get('total_business_listing');

		$categories= Input::get('categories');

		$reviews= Input::get('reviews');

		$browse_by_category= Input::get('browse_by_category');

		$view_all= Input::get('view_all');

		$premium_listings= Input::get('premium_listings');

		$review= Input::get('review');

		$recent_product= Input::get('recent_product');

		$price= Input::get('price');

		$post_your_requirement_free = Input::get('post_your_requirement_free');

		$just_complete_this_simple_form= Input::get('just_complete_this_simple_form');

		$product_services= Input::get('product_services');

		$requirements_in_detail= Input::get('requirements_in_detail');

		$prefer_location= Input::get('prefer_location');

		$your_name= Input::get('your_name');

		$email_contact = Input::get('email_&_contact');

		$email= Input::get('email');

		$phone_no= Input::get('phone_no');

		$post_requirement= Input::get('post_requirement');

		$popular_locations= Input::get('popular_locations');

		$recent_listing= Input::get('recent_listing');

		$our_office= Input::get('our_office');

		$company= Input::get('company');

		$address= Input::get('address');

		$office= Input::get('office');

		$mobile= Input::get('mobile');

		$quick_links= Input::get('quick_links');

		$subscribe_to_our_newsletter= Input::get('subscribe_to_our_newsletter');

		$enter_your_email_address= Input::get('enter_your_email_address');

		$privacy_we_will_never_spam_you = Input::get('privacy_we_will_never_spam_you');




		$language_data = "<?php

		return array(

		'register' => '$register',

		'add_business' => '$add_business',

		'login' => '$login',

		'administrator' => '$administrator',

		'dashboard' => '$dashboard',

		'change_password' => '$change_password',

		'add_your_business' => '$add_your_business',

		'profile' => '$profile',

		'logout' => '$logout',

		'contact' => '$contact',

		'close' => '$close',

		'member_login' => '$member_login',

		'email_address' => '$email_address',

		'password' => '$password',

		'submit' => '$submit',

		'forgot_your_password' => '$forgot_your_password',

		'services' => '$services',

		'business' => '$business',

		'product' => '$product',

		'buy_lead' => '$buy_lead',

		'what' => '$what',

		'e_g_web_development' => '$e_g_web_development',

		'choose_an_option' => '$choose_an_option',

		'where' => '$where',

		'clear' => '$clear',

		'find' => '$find',

		'business?' => '$business',

		'e_g_i_e_matrixinfoline' => '$e_g_i_e_matrixinfoline',

		'products?' => '$products',

		'total_business_listing' => '$total_business_listing',

		'categories' => '$categories',

		'reviews' => '$reviews',

		'browse_by_category' => '$browse_by_category',

		'view_all' => '$view_all',

		'premium_listings' => '$premium_listings',

		'review' => '$review',

		'recent_product' => '$recent_product',

		'price' => '$price',

		'post_your_requirement_free!' => '$post_your_requirement_free',

		'just_complete_this_simple_form' => '$just_complete_this_simple_form',

		'product_services' => '$product_services',

		'requirements_in_detail' => '$requirements_in_detail',

		'prefer_location' => '$prefer_location',

		'your_name' => '$your_name',

		'email_&_contact' => '$email_contact',

		'email' => '$email',

		'phone_no' => '$phone_no',

		'post_requirement' => '$post_requirement',

		'popular_locations' => '$popular_locations',

		'recent_listing' => '$recent_listing',

		'our_office' => '$our_office',

		'company' => '$company',

		'address' => '$address',

		'office' => '$office',

		'mobile' => '$mobile',

		'quick_links' => '$quick_links',

		'subscribe_to_our_newsletter' => '$subscribe_to_our_newsletter',

		'enter_your_email_address' => '$enter_your_email_address',

		'privacy_we_will_never_spam_you!' => '$privacy_we_will_never_spam_you',
		);

		";

		$fp = fopen($fn,"w") or die ("Error opening file in write mode!");


		fputs($fp,$language_data);
		fclose($fp) or die ("Error closing file!");

		$msg = '<div class="alert alert-info">Successfully Updated....</div>';
		return Redirect::back()->with('message',$msg);


	}

	public function get_inner(){

		$data['mode'] = "INNER";

		$this->theme->title("Edit Language");
		return $this->theme->render('admin::language',$data);
	}

	public function post_inner(){

		$filename = 'innerpage.php';

		$dirPath = path('app').'language/en/';
			
			
			
		$fn = $dirPath . $filename;



		$member_login = Input::get('member_login');

		$forgot_password = Input::get('forgot_password?');

		$member_login = Input::get('member_login');

		$all_fields_are_mandatory = Input::get('all_fields_are_mandatory');

		$user_email = Input::get('user_email');

		$type_something = Input::get('type_something');

		$password = Input::get('password');

		$forgot_your_password_dont_worry = Input::get('forgot_your_password?_dont_worry');

		$click_here = Input::get('click_here');

		$social_login = Input::get('social_login');

		$you_can_login_using_social_platform = Input::get('you_can_login_using_social_platform');

		$facebook = Input::get('facebook');

		$member_registration = Input::get('member_registration');

		$not_yet_member = Input::get('not_yet_member');

		$all_fields_are_mandatory = Input::get('all_fields_are_mandatory');

		$full_name = Input::get('full_name');

		$email = Input::get('email');

		$location = Input::get('location');

		$password = Input::get('password');

		$retype_password = Input::get('retype_password');

		$i_agree = Input::get('i_agree');

		$login_email = Input::get('login_email');

		$please_provide_correct= Input::get('please_provide_correct');

		$login_information = Input::get('login_information');

		$user_name = Input::get('user_name');

		$change_password = Input::get('change_password?');

		$confirm_password = Input::get('confirm_password');

		$personal_information = Input::get('personal_information');

		$name = Input::get('name');

		$gender = Input::get('gender');

		$male = Input::get('male');

		$female = Input::get('female');

		$update = Input::get('update');

		$list_of_all_messages_posted_by_visitor = Input::get('list_of_all_messages_posted_by_visitor');

		$comment = Input::get('comment');

		$by = Input::get('by');

		$delete = Input::get('delete');

		$dashboard = Input::get('dashboard');

		$title = Input::get('title');

		$settings = Input::get('settings');

		$status = Input::get('status');

		$hits= Input::get('hits');

		$menu= Input::get('menu');

		$edit= Input::get('edit');

		$gallery = Input::get('gallery');

		$products= Input::get('products');

		$add_business= Input::get('add_business');

		$cetegory_information= Input::get('cetegory_information');

		$category= Input::get('popular_locations');

		$select= Input::get('select');

		$address_information= Input::get('address_information');

		$street= Input::get('street');

		$address_2= Input::get('address(2)');

		$zip_code= Input::get('zip_code');

		$city= Input::get('city');

		$select_location= Input::get('select_location');

		$validate= Input::get('validate');

		$keyword= Input::get('keyword');

		$select_multiple = Input::get('select_multiple');

		$contact_information = Input::get('contact_information');

		$contact_information_of_your_business = Input::get('contact_information_of_your_business');

		$contact_no = Input::get('contact_no');

		$primary = Input::get('primary');

		$additional = Input::get('additional');


		$website = Input::get('website');

		$fax = Input::get('fax');

		$toll_free = Input::get('toll_free');

		$contact_persons = Input::get('contact_persons');

		$list_of_contact_persons_to_whome_visitor_can_contact = Input::get('list_of_contact_persons_to_whome_visitor_can_contact');

		$contact_person = Input::get('contact_person');

		$abount_your_business = Input::get('abount_your_business');

		$write_brief_description_about_your_business_and_services = Input::get('write_brief_description_about_your_business_and_services');

		$product_and_services = Input::get('product_and_services');

		$the_product_or_services_of_your_business_deals = Input::get('the_product_or_services_of_your_business_deals');

		$logo = Input::get('logo');

		$upload_your_business_logo = Input::get('upload_your_business_logo');

		$submit = Input::get('submit');

		$drag_the_pointer_and_set_your_location = Input::get('drag_the_pointer_and_set_your_location');

		$update_continue = Input::get('update_continue');

		$update_your_business_logo = Input::get('update_your_business_logo');

		$update = Input::get('update');

		$finish = Input::get('finish');

		$listing_plan = Input::get('listing_plan');

		$list_of_all_listing_plan = Input::get('list_of_all_listing_plan');

		$plan = Input::get('plan');

		$amount = Input::get('amount');

		$go = Input::get('go');

		$navigation = Input::get('navigation');

		$welcome = Input::get('welcome');

		$last_login = Input::get('last_login');

		$dashboard = Input::get('dashboard');

		$profile = Input::get('profile');

		$add_your_business = Input::get('add_your_business');

		$messages = Input::get('messages');

		$logout = Input::get('logout');

		$location = Input::get('location');

		$choose_an_option = Input::get('choose_an_option');

		$product_title = Input::get('product_title');

		$image = Input::get('image');

		$description = Input::get('description');

		$price = Input::get('price');

		$optional = Input::get('optional');

		$please_enter_currency_symbol = Input::get('please_enter_currency_symbol');

		$add = Input::get('add');

		$send_enquiry = Input::get('send_enquiry');

		$company_information = Input::get('company_information');

		$send_enquiry_to = Input::get('send_enquiry_to');

		$company_for = Input::get('company_for');

		$send_enquiry = Input::get('send_enquiry');

		$choose_a_location = Input::get('choose_a_location');

		$minimum_character = Input::get('minimum_character');

		$save_changes = Input::get('save_changes');

		$reply = Input::get('reply');

		$products_services = Input::get('products_services');

		$all_products = Input::get('all_products');

		$searching_for_products_with = Input::get('searching_for_products_with');

		$oops_no_data_found = Input::get('oops_no_data_found');

		$buy_lead = Input::get('buy_lead');

		$refine_results = Input::get('refine_results');

		$all_category = Input::get('all_category');

		$your_name = Input::get('your_name');

		$purpose = Input::get('purpose');

		$our_office = Input::get('our_office');

		$comments = Input::get('comments');

		$ratting = Input::get('ratting');

		$posted_by = Input::get('posted_by');

		$on = Input::get('on');

		$view_all_comments = Input::get('view_all_comments');

		$click_here = Input::get('click_here');

		$reviews = Input::get('reviews');

		$post_your_review = Input::get('post_your_review');

		$post_your_review = Input::get('post_your_review');

		$post_review_to = Input::get('post_review_to');

		$marks_fields_are_mandatory = Input::get('marks_fields_are_mandatory');

		$enter_location = Input::get('enter_location');

		$all_listings = Input::get('all_listings');

		$searching_for_businesses_with = Input::get('searching_for_businesses_with');

		$listing_detail_company = Input::get('listing_detail_company');

		$listing_detail_gallery = Input::get('listing_detail_gallery');

		$listing_detail_send = Input::get('listing_detail_send');

		$listing_detail_enquiry = Input::get('listing_detail_enquiry');

		$are_you_owner_of_the_business = Input::get('are_you_owner_of_the_business');

		$claim_now = Input::get('claim_now');

		$verified = Input::get('verified');

		$ratting = Input::get('ratting');

		$about = Input::get('about');

		$product_and_services_of = Input::get('product_and_services_of');

		$report_incorrect = Input::get('report_incorrect');

		$if_you_found_wrong_information = Input::get('if_you_found_wrong_information');

		$report_type = Input::get('report_type');

		$claim_report_on = Input::get('claim_report_on');

		$claim_report = Input::get('claim_report');

		$position_at = Input::get('position_at');

		$browse_by_category = Input::get('browse_by_category');

		$add_product = Input::get('add_product');

		

		$language_data1 = "<?php

		return array(

		'member_login' => '$member_login',

		'forgot_password?' => '$forgot_password',

		'all_fields_are_mandatory' => '$all_fields_are_mandatory',

		'user_email' => '$user_email',

		'type_something' => '$type_something',

		'password' => '$password',

		'forgot_your_password?_dont_worry' => '$forgot_your_password_dont_worry',

		'click_here' => '$click_here',

		'social_login' => '$social_login',

		'you_can_login_using_social_platform' => '$you_can_login_using_social_platform',

		'facebook' => '$facebook',

		'member_registration' => '$member_registration',

		'not_yet_member' => '$not_yet_member',

		'all_fields_are_mandatory' => '$all_fields_are_mandatory',

		'full_name' => '$full_name',

		'email' => '$email',

		'location' => '$location',

		'password' => '$password',

		'retype_password' => '$retype_password',

		'i_agree' => '$i_agree',

		'login_email' => '$login_email',

		'please_provide_correct' => '$please_provide_correct',

		'login_information' => '$login_information',

		'user_name' => '$user_name',

		'change_password?' => '$change_password',

		'confirm_password' => '$confirm_password',

		'personal_information' => '$personal_information',

		'name' => '$name',

		'gender' => '$gender',

		'male' => '$male',

		'female' => '$female',

		'update' => '$update',

		'list_of_all_messages_posted_by_visitor' => '$list_of_all_messages_posted_by_visitor',

		'comment' => '$comment',

		'by' => '$by',

		'delete' => '$delete',

		'dashboard' => '$dashboard',

		'title' => '$title',

		'settings' => '$settings',

		'status' => '$status',

		'hits' => '$hits',

		'menu' => '$menu',

		'edit' => '$edit',

		'gallery' => '$gallery',

		'products' => '$products',

		'add_business' => '$add_business',

		'cetegory_information' => '$cetegory_information',

		'category' => '$category',

		'select' => '$select',

		'address_information' => '$address_information',

		'street' => '$street',

		'address(2)' => '$address_2',

		'zip_code' => '$zip_code',

		'city' => '$city',

		'select_location' => '$select_location',

		'validate' => '$validate',

		'keyword' => '$keyword',

		'select_multiple' => '$select_multiple',

		'contact_information' => '$contact_information',

		'contact_information_of_your_business' => '$contact_information_of_your_business',

		'contact_no' => '$contact_no',

		'primary' => '$primary',

		'additional' => '$additional',

		'website' => '$website',

		'fax' => '$fax',

		'toll_free' => '$toll_free',

		'contact_persons' => '$contact_persons',

		'list_of_contact_persons_to_whome_visitor_can_contact' => '$list_of_contact_persons_to_whome_visitor_can_contact',

		'contact_person' => '$contact_person',

		'abount_your_business' => '$abount_your_business',

		'write_brief_description_about_your_business_and_services' => '$write_brief_description_about_your_business_and_services',

		'product_and_services' => '$product_and_services',

		'the_product_or_services_of_your_business_deals' => '$the_product_or_services_of_your_business_deals',

		'logo' => '$logo',

		'upload_your_business_logo' => '$upload_your_business_logo',

		'submit' => '$submit',

		'drag_the_pointer_and_set_your_location' => '$drag_the_pointer_and_set_your_location',

		'update_continue' => '$update_continue',

		'update_your_business_logo' => '$update_your_business_logo',

		'update' => '$update',

		'finish' => '$finish',

		'listing_plan' => '$listing_plan',

		'list_of_all_listing_plan' => '$list_of_all_listing_plan',

		'plan' => '$plan',

		'amount' => '$amount',

		'go' => '$go',

		'navigation' => '$navigation',

		'welcome' => '$welcome',

		'last_login' => '$last_login',

		'dashboard' => '$dashboard',

		'profile' => '$profile',

		'add_your_business' => '$add_your_business',

		'messages' => '$messages',

		'logout' => '$logout',

		'location' => '$location',

		'choose_an_option' => '$choose_an_option',

		'product_title' => '$product_title',

		'image' => '$image',

		'description' => '$description',

		'price' => '$price',

		'optional' => '$optional',

		'please_enter_currency_symbol' => '$please_enter_currency_symbol',

		'add' => '$add',

		'send_enquiry' => '$send_enquiry',

		'company_information' => '$company_information',

		'close' => '$close',

		'send_enquiry_to' => '$send_enquiry_to',

		'company_for' => '$company_for',

		'send_enquiry' => '$send_enquiry',

		'choose_a_location' => '$choose_a_location',

		'minimum_character' => '$minimum_character',

		'save_changes' => '$save_changes',

		'reply' => '$reply',

		'products_services' => '$products_services',

		'all_products' => '$all_products',

		'searching_for_products_with' => '$searching_for_businesses_with',

		'oops_no_data_found' => '$oops_no_data_found',

		'buy_lead' => '$buy_lead',

		'refine_results' => '$refine_results',

		'all_category' => '$all_category',

		'your_name' => '$your_name',

		'purpose' => '$purpose',

		'our_office' => '$our_office',

		'comments' => '$comments',

		'ratting' => '$ratting',

		'posted_by' => '$posted_by',

		'on' => '$on',

		'view_all_comments' => '$view_all_comments',

		'click_here' => '$click_here',

		'reviews' => '$reviews',

		'post_your_review' => '$post_your_review',

		'post_review_to' => '$post_review_to',

		'marks_fields_are_mandatory' => '$marks_fields_are_mandatory',

		'enter_location' => '$enter_location',

		'all_listings' => '$all_listings',

		'searching_for_businesses_with' => '$searching_for_businesses_with',


		'listing_detail_company' => '$listing_detail_company',

		'listing_detail_gallery' => '$gallery',

		'listing_detail_send' => '$listing_detail_send',

		'listing_detail_enquiry' => '$listing_detail_enquiry',

		'are_you_owner_of_the_business' => '$are_you_owner_of_the_business',

		'claim_now' => '$claim_now',

		'verified' => '$verified',

		'ratting' => '$ratting',

		'about' => '$about',

		'product_and_services_of' => '$product_and_services_of',

		'report_incorrect' => '$report_incorrect',

		'if_you_found_wrong_information' => '$if_you_found_wrong_information',

		'report_type' => '$report_type',

		'claim_report_on' => '$claim_report_on',

		'claim_report' => '$claim_report',

		'position_at' => '$position_at',

		'browse_by_category' => '$browse_by_category',

		'add_product' => '$add_product',
		);";

		$fp = fopen($fn,"w") or die ("Error opening file in write mode!");


		fputs($fp,$language_data1);
		fclose($fp) or die ("Error closing file!");

		$msg = '<div class="alert alert-info">Successfully Updated....</div>';
		return Redirect::back()->with('message',$msg);


	}

	public function get_pagination(){

		dd("Pag");
	}
}